package com.ymttest.common.enums;

/**
 * 订单项目类型
 */
public enum OrderInfoTypeEnum {
	/**
	 * 报价
	 */
	Catalog(0),
	/**
	 * 定金
	 */
	Earnest(1),
	/**
	 * 其他
	 */
	Generic(2);

	private int intValue;
	private static java.util.HashMap<Integer, OrderInfoTypeEnum> mappings;

	private synchronized static java.util.HashMap<Integer, OrderInfoTypeEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, OrderInfoTypeEnum>();
		}
		return mappings;
	}

	private OrderInfoTypeEnum(int value) {
		intValue = value;
		OrderInfoTypeEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static OrderInfoTypeEnum forValue(int value) {
		return getMappings().get(value);
	}
}